<template>
  <el-calendar>
    <template slot="dateCell" slot-scope="{ date, data }">
      <div class="date-content">
        <span class="text">{{ data.day.split('-')[2] }}</span>
        <span v-if="format(date)" class="rest"> 休</span>
      </div>
    </template>
  </el-calendar>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    format(date) {
      return date.getDay() === 6 || date.getDay() === 0
    }
  }
}
</script>
